package com.example.jetpackcomposestate.four

import androidx.annotation.StringRes
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.AccountBox
import androidx.compose.material.icons.filled.Clear
import androidx.compose.material.icons.filled.DateRange
import androidx.compose.material.icons.filled.Delete
import androidx.compose.material.icons.filled.Done
import androidx.compose.ui.graphics.vector.ImageVector
import com.example.jetpackcomposestate.R
import java.util.UUID

/**
 * @author huangzehui
 * @date 2/5/2024 下午11:09 周四
 * @description
 *
 * https://www.bilibili.com/video/BV1ob4y1a7ad?p=27&spm_id_from=pageDriver&vd_source=e07cc8cc94eb22bd76722071b03cd199
 */

data class TodoItem(
    val task: String,
    val icon: TodoIcon = TodoIcon.DEFAULT,
    val id: UUID = UUID.randomUUID()
)

enum class TodoIcon(
    val imageVector: ImageVector,
    @StringRes val contentDescription: Int
) {
    // 使用 Material Design的图标
    Square(Icons.Default.AccountBox, R.string.cd_expand),
    Done(Icons.Default.Done, R.string.cd_done),
    Event(Icons.Default.DateRange, R.string.cd_event),
    Privacy(Icons.Default.Delete, R.string.cd_privacy),
    Trash(Icons.Default.Clear, R.string.cd_restore);

    companion object {
        val DEFAULT = Square
    }
}